package cn.bgs.controller;

import cn.bgs.page.PageRequest;
import cn.bgs.pojo.Complaints;
import cn.bgs.service.ComplainService;
import cn.bgs.utils.R;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Complain")
public class ComplainController {
    @Autowired
    private ComplainService complainService;
    @GetMapping("/complainSelect")
    public PageInfo<Complaints> complainSelect(PageRequest pageRequest,Integer complaintsTypeId){
        PageInfo<Complaints> allUser = complainService.complainSelect(pageRequest,complaintsTypeId);
        return allUser;
    }
    @GetMapping("/tousuSelect")
    public R tousuSelect(){
        return complainService.tousuSelect();
    }
}
